function HttpManager() {

    var HttpManagerSelf = this;        //Not a class member. Has to be a unique name for the class

    //Member Vars
    this.onread = null;
    this.xhr = null;

    //Constructor
    {
        //Initialize XMLHttpRequest
        try {  
            this.xhr = new ActiveXObject('Msxml2.XMLHTTP');   
        }
        catch (e) {
            try {   
                this.xhr = new ActiveXObject('Microsoft.XMLHTTP');    
            }
            catch (e2) {
                try {  
                    this.xhr = new XMLHttpRequest();     
                }
                catch (e3) {  
                    this.xhr = false;   
                }
            }
        }
    } 

    //Request information in a form of a text string 
    this.getAsText = function (requestString) { 

        this.xhr.onreadystatechange = function() { 
            if( HttpManagerSelf.xhr.readyState == 4 ) {
                if( HttpManagerSelf.xhr.status == 200 ) { 
                    HttpManagerSelf.onread(HttpManagerSelf.xhr.responseText);
                } 
                else { 
                    HttpManagerSelf.onread("N/A");
                }
            }
        };

       this.xhr.open("GET", requestString, true);
       this.xhr.send(null);
    }
} 

